Page({
  data: {
    userList: [
      {
        title: '设置',
        icon: '/asset/imgs/set.png',
        path: '/pages/set/index'
      },
      {
        title: '查看壁纸',
        icon: '/asset/imgs/imgW.png',
        path: '/pages/imageW/index'
      },
      {
        title: '退出',
        icon: '/asset/imgs/logout.png',
        path: '/pages/login/index'
      },
    ],
  },

  onLoad(options) {

  },

  // 跳转
  navUser(e){  
    const index = e.currentTarget.dataset.index
    const path = this.data.userList[index].path
    wx.navigateTo({
      url: path,
      fail(){ 
        wx.switchTab({ 
          url: path,
        })
      }  
    })
  },

})